<div class="bg-light lter b-b wrapper-md ng-scope">
    <h4 class="m-n font-thin">系统设置</h4>
</div>
<div class="panel-body">
    <div class="panel-body panel" ng-controller="systemConfigCtrl">
        <div>
            <div class="panel-body bg-light">
                <span class="font-bold">总部系统设置</span>
            </div>
            <div>
                <form name="systemConfigForm" ng-submit="update()">
                    <div class="panel-body">
                        <div class="form-group">
                            <label class="col-sm-1 control-label text-right m-t-xs">是否返利</label>
                            <div class="col-sm-4">
                                <div class="inline m-b-sm">
                                    <div class="pull-left">
                                        <label class="i-switch m-t-xs m-r">
                                            <input type="checkbox" ng-model="systemConfigService.systemConfigEditVO.isOpenRebate" ng-click="select(systemConfigService.systemConfigEditVO.id,systemConfigService.systemConfigEditVO.isOpenRebate)" ng-true-value="1" ng-false-value="0">
                                            <i></i>
                                        </label>
                                    </div>
                                    <label class="pull-left m-t-xs m-r" ng-if="systemConfigService.systemConfigEditVO.isOpenRebate==0">关闭</label>
                                    <label class="pull-left m-t-xs m-r" ng-if="systemConfigService.systemConfigEditVO.isOpenRebate==1">开启</label>
                                    <i class="m-t-sm pull-left m-l-xs fa fa-question-circle text-muted pos-rlt h6"  popover-placement="top" popover="控制商户商品是否参与返利设置" popover-trigger="mouseenter"></i>
                                </div>
                                <div ng-if="systemConfigService.systemConfigEditVO.isOpenRebate==1">
                                    <p class="inline m-r-xs">排队值:</p>
                                    <input type="text" class="form-control w-xs inline" maxlength="2" ng-model="systemConfigService.systemConfigEditVO.rebateParameter">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="panel-body">
                        <div class="form-group">
                            <label class="col-sm-1 control-label text-right m-t-xs">是否会员分销</label>
                            <div class="col-sm-4">
                                <div class="inline m-b-sm">
                                    <div class="pull-left">
                                        <label class="i-switch m-t-xs m-r">
                                            <input type="checkbox" ng-model="systemConfigService.systemConfigEditVO.isOpenMemberSell" ng-true-value="1" ng-false-value="0">
                                            <i></i>
                                        </label>
                                    </div>
                                    <label class="pull-left m-t-xs m-r" ng-if="systemConfigService.systemConfigEditVO.isOpenMemberSell==0">关闭</label>
                                    <label class="pull-left m-t-xs m-r" ng-if="systemConfigService.systemConfigEditVO.isOpenMemberSell==1">开启</label>
                                    <i class="m-t-sm pull-left m-l-xs fa fa-question-circle text-muted pos-rlt h6"  popover-placement="top" popover="控制用户是否达到相应的金额才享有二级分润" popover-trigger="mouseenter"></i>
                                </div>
                                <div ng-if="systemConfigService.systemConfigEditVO.isOpenMemberSell==1">
                                    <p class="inline m-r-xs">金额:</p>
                                    <input type="text" class="form-control w-xs inline" ng-model="systemConfigService.systemConfigEditVO.sellValue">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="panel-body">
                        <div class="form-group">
                            <label class="col-sm-1 control-label text-right m-t-xs">关键字搜索</label>
                            <div class="col-sm-4">
                                <div class="inline m-b-sm">
                                    <div class="pull-left">
                                        <label class="i-switch m-t-xs m-r">
                                            <input type="checkbox" ng-model="systemConfigService.systemConfigEditVO.isOpenKeyWord" ng-true-value="1" ng-false-value="0">
                                            <i></i>
                                        </label>
                                    </div>
                                    <label class="pull-left m-t-xs m-r" ng-if="systemConfigService.systemConfigEditVO.isOpenKeyWord==0">关闭</label>
                                    <label class="pull-left m-t-xs m-r" ng-if="systemConfigService.systemConfigEditVO.isOpenKeyWord==1">开启</label>
                                    <i class="m-t-sm pull-left m-l-xs fa fa-question-circle text-muted pos-rlt h6"  popover-placement="top" popover="小程序购买渠道合伙人成功跳转页面搜索" popover-trigger="mouseenter"></i>
                                </div>
                                <div ng-if="systemConfigService.systemConfigEditVO.isOpenKeyWord==1">
                                    <p class="inline m-r-xs">关键字:</p>
                                    <input type="text" class="form-control w-xs inline" ng-model="systemConfigService.systemConfigEditVO.keyWord">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="panel-body">
                        <div class="form-group">
                            <label class="col-sm-1 control-label text-right m-t-xs">是否开启新用领取乐积分</label>
                            <div class="col-sm-4">
                                <div class="inline m-b-sm">
                                    <div class="pull-left">
                                        <label class="i-switch m-t-xs m-r">
                                            <input type="checkbox" ng-model="systemConfigService.systemConfigEditVO.isOpenLegeIntegral" ng-true-value="1" ng-false-value="0">
                                            <i></i>
                                        </label>
                                    </div>
                                    <label class="pull-left m-t-xs m-r" ng-if="systemConfigService.systemConfigEditVO.isOpenLegeIntegral==0">关闭</label>
                                    <label class="pull-left m-t-xs m-r" ng-if="systemConfigService.systemConfigEditVO.isOpenLegeIntegral==1">开启</label>
                                    <i class="m-t-sm pull-left m-l-xs fa fa-question-circle text-muted pos-rlt h6"  popover-placement="top" popover="设置新用领取乐积分" popover-trigger="mouseenter"></i>
                                </div>
                                <div ng-if="systemConfigService.systemConfigEditVO.isOpenLegeIntegral==1">
                                    <p class="inline m-r-xs">积分:</p>
                                    <input type="text" class="form-control w-xs inline" ng-model="systemConfigService.systemConfigEditVO.legeIntegral">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="panel-body">
                        <div class="form-group">
                            <label class="col-sm-1 control-label text-right m-t-xs">是否开启消费返利</label>
                            <div class="col-sm-4">
                                <div class="inline m-b-sm">
                                    <div class="pull-left">
                                        <label class="i-switch m-t-xs m-r">
                                            <input type="checkbox" ng-model="systemConfigService.systemConfigEditVO.isOpenConsume" ng-true-value="1" ng-false-value="0">
                                            <i></i>
                                        </label>
                                    </div>
                                    <label class="pull-left m-t-xs m-r">关闭</label>
                                    <i class="m-t-sm pull-left m-l-xs fa fa-question-circle text-muted pos-rlt h6"  popover-placement="top" popover="设置用户消费成功返利(返乐积分)" popover-trigger="mouseenter"></i>
                                </div>
                                <div ng-if="systemConfigService.systemConfigEditVO.isOpenConsume==1">
                                    <p class="inline m-r-xs">返利比例:</p>
                                    <input type="text" class="form-control w-xs inline" ng-model="systemConfigService.systemConfigEditVO.consumeValue">
                                    <p class="inline m-r-xs">%</p>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="panel-body">
                        <div class="form-group">
                            <label class="col-sm-1 control-label text-right m-t-xs">是否开启分享赠送积分</label>
                            <div class="col-sm-4">
                                <div class="inline m-b-sm">
                                    <div class="pull-left">
                                        <label class="i-switch m-t-xs m-r">
                                            <input type="checkbox" ng-model="systemConfigService.systemConfigEditVO.isOpenShare" ng-true-value="1" ng-false-value="0">
                                            <i></i>
                                        </label>
                                    </div>
                                    <label class="pull-left m-t-xs m-r">关闭</label>
                                    <i class="m-t-sm pull-left m-l-xs fa fa-question-circle text-muted pos-rlt h6"  popover-placement="top" popover="设置用户分享小程序,赠送乐积分。一级关系获得(N)积分，二级关系获得(N)积分" popover-trigger="mouseenter"></i>
                                </div>
                                <div ng-if="systemConfigService.systemConfigEditVO.isOpenShare==1">
                                    <p class="inline m-r-xs">一级获得:</p>
                                    <input type="text" class="form-control w-xs inline" ng-model="systemConfigService.systemConfigEditVO.oneValue">
                                    <p class="inline m-r-xs">积分</p>
                                </div>
                                <div ng-if="systemConfigService.systemConfigEditVO.isOpenShare==1">
                                    <p class="inline m-r-xs">二级获得:</p>
                                    <input type="text" class="form-control w-xs inline" ng-model="systemConfigService.systemConfigEditVO.twoValue">
                                    <p class="inline m-r-xs">积分</p>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="panel-body">
                        <div class="form-group">
                            <label class="col-sm-1 control-label text-right m-t-xs">是否开启单独小程序获取积分</label>
                            <div class="col-sm-4">
                                <div class="inline m-b-sm">
                                    <div class="pull-left">
                                        <label class="i-switch m-t-xs m-r">
                                            <input type="checkbox" ng-model="systemConfigService.systemConfigEditVO.isOpenShopIntegral" ng-true-value="1" ng-false-value="0">
                                            <i></i>
                                        </label>
                                    </div>
                                    <label class="pull-left m-t-xs m-r">关闭</label>
                                    <i class="m-t-sm pull-left m-l-xs fa fa-question-circle text-muted pos-rlt h6"  popover-placement="top" popover="单独小程序点击红包跳转乐鸽平台，单独小程序获取相应积分" popover-trigger="mouseenter"></i>
                                </div>
                                <div ng-if="systemConfigService.systemConfigEditVO.isOpenShopIntegral==1">
                                    <p class="inline m-r-xs">积分:</p>
                                    <input type="text" class="form-control w-xs inline" ng-model="systemConfigService.systemConfigEditVO.shopIntegralValue">
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="panel-body">
                        <div class="form-group">
                            <label class="col-sm-1 control-label text-right m-t-xs">是否开启商家入驻赠送积分</label>
                            <div class="col-sm-4">
                                <div class="inline m-b-sm">
                                    <div class="pull-left">
                                        <label class="i-switch m-t-xs m-r">
                                            <input type="checkbox" ng-model="systemConfigService.systemConfigEditVO.isOpenShopLocatedIntegral" ng-true-value="1" ng-false-value="0">
                                            <i></i>
                                        </label>
                                    </div>
                                    <label class="pull-left m-t-xs m-r">关闭</label>
                                    <i class="m-t-sm pull-left m-l-xs fa fa-question-circle text-muted pos-rlt h6"  popover-placement="top" popover="老用户分享入驻专题页面,用户成功入驻小程序,老用户得到入驻费用百分比的积分(例：2800*10%=280)" popover-trigger="mouseenter"></i>
                                </div>
                                <div ng-if="systemConfigService.systemConfigEditVO.isOpenShopLocatedIntegral==1">
                                    <p class="inline m-r-xs">积分比例:</p>
                                    <input type="text" class="form-control w-xs inline" ng-model="systemConfigService.systemConfigEditVO.shopLocatedIntegral">
                                    <p class="inline m-r-xs">%</p>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="panel-body">
                            <div class="form-group">
                                <label class="col-sm-1 control-label text-right m-t-xs">是否开启免费入驻</label>
                                <div class="col-sm-4">
                                    <div class="inline m-b-sm">
                                        <div class="pull-left">
                                            <label class="i-switch m-t-xs m-r">
                                                <input type="checkbox" ng-model="systemConfigService.systemConfigEditVO.isOpenAdmission" ng-true-value="1" ng-false-value="0">
                                                <i></i>
                                            </label>
                                        </div>
                                        <label class="pull-left m-t-xs m-r">
                                            <span ng-if="systemConfigService.systemConfigEditVO.isOpenAdmission == 0">
                                                关闭
                                            </span>
                                            <span ng-if="systemConfigService.systemConfigEditVO.isOpenAdmission == 1">
                                                开启
                                            </span>
                                        </label>
                                        <i class="m-t-sm pull-left m-l-xs fa fa-question-circle text-muted pos-rlt h6"  popover-placement="top" popover="免费入驻,小程序审核期间请关闭此功能" popover-trigger="mouseenter"></i>
                                    </div>
                                </div>
                            </div>
                        </div>

                    <div class="b-t">
                        <div class="col-sm-4 padder-v col-sm-offset-2">
                            <button type="submit" class="btn btn-success">保存设置</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>